package com.manage.servlet;

import com.manage.pojo.ResultData;
import com.manage.service.RoomService;
import com.manage.service.impl.RoomServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/room")
public class RoomSerlet extends BaseServlet{
    public ResultData all(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {
        //1.获取数据
        String page = request.getParameter("page");
        String limit = request.getParameter("limit");

        //2.处理请求
        RoomService roomService=new RoomServiceImpl();
        ResultData resultData = roomService.selectByPage(page, limit);


        //3.响应请求
        return resultData;
    }
}
